Fix HTML documentation
authorJochen Sprickerhof <git@jochen.sprickerhof.de>
Tue, 25 Jan 2022 21:18:11 +0000 (22:18 +0100)
committerJochen Sprickerhof <git@jochen.sprickerhof.de>
Tue, 25 Jan 2022 22:15:04 +0000 (23:15 +0100)
Thanks: tsteven4

debian/clean
debian/control
debian/gpsbabel-doc.doc-base
debian/gpsbabel-doc.docs
debian/patches/htmldoc-location
debian/rules

index fb2fb86a7cf6b286dc4c2e18c2ea8b5e539f1d83..613e2c21597eea058a65fdf65c2966f940168c6d 100644 (file)
@@ -1,2 +1,3 @@
 debian/gpsbabel.1
 debian/gpsbabel.xpm
+html/
index 6aa42d2d49a7cb061bfa65ce9e1e42fa09622dbf..420d2ec1e6f40323e5803498548760aac39e7271 100644 (file)
@@ -72,7 +72,7 @@ Description: GPS file conversion plus transfer to/from GPS units - documentation
 
 Package: gpsbabel-gui
 Architecture: amd64 arm64 armhf i386 mips64el mipsel
-Depends: ${shlibs:Depends}, ${misc:Depends}, gpsbabel (= ${binary:Version})
+Depends: ${shlibs:Depends}, ${misc:Depends}, gpsbabel (= ${binary:Version}), gpsbabel-doc (= ${source:Version})
 Recommends: qttranslations5-l10n
 Description: GPS file conversion plus transfer to/from GPS units - GUI
  GPSBabel converts waypoints, tracks, and routes from one format to
index ea8d6b96a97cc049a304cc5c840aeb016d4c15e3..bdf0abfc81d6368a94d9d35f9cde5f2e5828d1db 100644 (file)
@@ -3,8 +3,8 @@ Title: gpsbabel filter and format documentation
 Section: Science/Geoscience
 
 Format: HTML
-Files: /usr/share/doc/gpsbabel/gpsbabel.html
-Index: /usr/share/doc/gpsbabel/gpsbabel.html
+Files: /usr/share/doc/gpsbabel/html/
+Index: /usr/share/doc/gpsbabel/html/index.html
 
 Format: PDF
 Files: /usr/share/doc/gpsbabel/gpsbabel.pdf.gz
index 9f7267be7cb793a839337de407945fd24fe8c490..cd1b4a5a4466635c3b7ca1f913014037f007e36a 100644 (file)
@@ -1,2 +1,2 @@
-gpsbabel.html
+html/
 gpsbabel.pdf
index fcc1eb29f48f915990797e47d03cfbc0eba4ee3e..c20163c9a272fc6120353f1cace33b7c438c51b2 100644 (file)
@@ -5,19 +5,8 @@
  #define VERSION \"$${GB.MAJOR}.$${GB.MINOR}.$${GB.MICRO}$${GB.PACKAGE_RELEASE}\"
  constexpr char kVersionSHA[] = \"$${GB.SHA}\";
 -#define WEB_DOC_DIR \"https://www.gpsbabel.org/htmldoc-$${DOCVERSION}\"
-+#define WEB_DOC_DIR \"file:///usr/share/doc/gpsbabel\"
++#define WEB_DOC_DIR \"file:///usr/share/doc/gpsbabel/html\"
  #endif
---- a/gui/mainwindow.cc
-+++ b/gui/mainwindow.cc
-@@ -1156,7 +1156,7 @@ void MainWindow::preferencesActionX()
- //------------------------------------------------------------------------
- void MainWindow::helpActionX()
- {
--  ShowHelp("index.html");
-+  ShowHelp("gpsbabel.html");
- }
- //------------------------------------------------------------------------
- void MainWindow::filtersClicked()
 --- a/testo.d/serialization.test
 +++ b/testo.d/serialization.test
 @@ -7,7 +7,7 @@
@@ -25,7 +14,7 @@
  # We do a compare_nole as specific whitespace is part of deserialization.
  gpsbabel -^3 > ${TMPDIR}/format3.txt
 -sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt
-+sed 's,file:///usr/share/doc/gpsbabel/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt
++sed 's,file:///usr/share/doc/gpsbabel/html/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/format3.txt >${TMPDIR}/format3.fiddled.txt
  compare_nole ${REFERENCE}/format3.txt ${TMPDIR}/format3.fiddled.txt
  gpsbabel -^2 > ${TMPDIR}/format2.txt
  compare_nole ${REFERENCE}/format2.txt ${TMPDIR}/format2.txt
  compare_nole ${REFERENCE}/format0.txt ${TMPDIR}/format0.txt
  gpsbabel -%1 > ${TMPDIR}/filter1.txt
 -sed 's,https://www.gpsbabel.org/htmldoc-.[^/]*/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt
-+sed 's,file:///usr/share/doc/gpsbabel/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt
++sed 's,file:///usr/share/doc/gpsbabel/html/,https://www.gpsbabel.org/WEB_DOC_DIR/,' ${TMPDIR}/filter1.txt >${TMPDIR}/filter1.fiddled.txt
  compare_nole ${REFERENCE}/filter1.txt ${TMPDIR}/filter1.fiddled.txt
  gpsbabel -%0 > ${TMPDIR}/filter0.txt
  compare_nole ${REFERENCE}/filter0.txt ${TMPDIR}/filter0.txt
+--- a/tools/make_gpsbabel_org.sh
++++ b/tools/make_gpsbabel_org.sh
+@@ -4,15 +4,12 @@ set -ex
+ web=$1
+ docversion=$2
+-mkdir -p "${web}/htmldoc-${docversion}"
++mkdir -p "html"
+ perl xmldoc/makedoc
+ xmlwf xmldoc/readme.xml #check for well-formedness
+ xmllint --noout --valid xmldoc/readme.xml #validate
+ xsltproc \
+-  --stringparam base.dir "${web}/htmldoc-${docversion}/" \
++  --stringparam base.dir "html" \
+   --stringparam root.filename "index" \
+   xmldoc/babelmain.xsl \
+   xmldoc/readme.xml
+-tools/fixdoc "${web}/htmldoc-${docversion}" "GPSBabel ${docversion}:"
+-tools/mkcapabilities "${web}" "${web}/htmldoc-${docversion}"
+-cp gpsbabel.pdf "${web}/htmldoc-${docversion}/gpsbabel-${docversion}.pdf"
+--- a/xmldoc/babelmain.xsl
++++ b/xmldoc/babelmain.xsl
+@@ -45,13 +45,11 @@
+     <xsl:apply-imports/>
+   </xsl:param>
+-  {extends file="main.tpl"}
+     <xsl:call-template name="html.head">
+       <xsl:with-param name="prev" select="$prev"/>
+       <xsl:with-param name="next" select="$next"/>
+     </xsl:call-template>
+       <xsl:call-template name="body.attributes"/>
+-  {block name=body}{literal}
+                       <xsl:call-template name="user.header.navigation"/>
+                       <xsl:call-template name="header.navigation">
+@@ -73,7 +71,6 @@
+                       </xsl:call-template>
+                       <xsl:call-template name="user.footer.navigation"/>
+-      {/literal}{/block}
+   <xsl:value-of select="$chunk.append"/>
+ </xsl:template>
 --- a/xmldoc/gpsbabel_man.xml
 +++ b/xmldoc/gpsbabel_man.xml
 @@ -127,7 +127,7 @@ or as the backend for other tools. </para>
index 613b7c2eb8b1da61ef7c7cbfc8d137a9527892ef..87aee43c53b16f006e4edcd040b8e0a71216d58f 100755 (executable)
@@ -25,5 +25,4 @@ execute_after_dh_auto_build-arch:
        if dpkg -s qtwebengine5-dev > /dev/null; then dh_auto_build -- unix-gui; fi
 
 override_dh_auto_build-indep:
-       $(MAKE) gpsbabel.pdf
-       $(MAKE) gpsbabel.html
+       $(MAKE) gpsbabel.org